<template>
    <div class="demo2">
        <!-- 头部 -->
        <!-- <div class="header">
            <x-icon type="ios-arrow-left" size="" class="icon-white" @click="$router.go(-1)"></x-icon>选择检查单位
        </div> -->
        <!-- 内容部分 -->
        <div class="demo2_main">
            <noData v-if="arr1 == 0"></noData>
            <div class="list1Box">
                <group>
                    <radio :options="arr1"
                           @on-change="change"
                           v-model="radios"></radio>
                </group>
            </div>
        </div>
        <myMenu @clickBack="back"></myMenu>
    </div>
</template>
<script>
import { Radio, Group } from 'vux'
import myMenu from '@/commonComponents/menu'
export default {
    components: {
        Radio,
        Group,
        myMenu
    },
    data () {
        return {
            show: false,
            radios: '全部',
            arr1: ['全部', '轻伤事故', '重伤事故', '一般事故', '较大事故', '重大事故', '特别重大事故']
        }
    },
    mounted () {
        if (this.$route.query.radios) {
            this.radios = this.$route.query.radios
        }
    },
    methods: {
        back () {

        },
        change (value, label) {
            window.sessionStorage.setItem('name2', label)
            if (this.radios != value) {
                this.$router.go(-1)
            }
        }
    }
}
function getResult (val) {
    let rs = []
    for (let i = 0; i < 20; i++) {
        rs.push({
            title: `${val} result: ${i + 1} `,
            other: i
        })
    }
    return rs
}
</script>
<style lang="less" scope>
.demo2 {
    width: 100%;
    height: 100%;
    // .header{
    //     width: 100%;
    //     height: 40px;
    //     line-height: 40px;
    //     text-align: center;
    //     position: relative;
    //     font-size: 18px;
    //     background: #2269ff;
    //     color: #fff;
    //     .vux-x-icon{
    //         fill:cornsilk;
    //         position: absolute;
    //         left: 0;
    //         top: 5px;
    //         width: 30px;
    //         height: 30px;
    //     }
    // }
    .demo2_main {
        height: 603px;
        width: 100%;
        background-color: #ebeef2;
        .list1Box {
            width: 100%;
            height: 603px;
            background-color: #fff;
            .weui-search-bar__cancel-btn {
                display: none;
            }
        }
    }
    .weui-cells_radio {
        // margin-top: 40px;
    }
    .vux-search-fixed {
        top: 40px;
    }
    .weui-cells.vux-search_show {
        display: none;
    }
    .vux-search-box {
        position: static !important;
    }
}
</style>
